'''
Created on Sep 3, 2009

@author: mkiyer
'''

from veggie.coverage.buildcoveragetracks import bowtie_to_coverage
from veggie.io.cbowtieparser import BowtieParser
from optparse import OptionParser
import logging

if __name__ == '__main__':
    # setup and parse command line
    optionparser = OptionParser("usage: %prog [options] <files>")
    optionparser.add_option("-o", "--output", dest="outfile",
                            help="output file [default: %default]")
    (options, args) = optionparser.parse_args()
    if len(args) == 0:
        optionparser.error("no sample names specified")
    input_file = args[0]
    output_file = args[1]
    # setup logging
    logging.basicConfig(level=logging.DEBUG)
    # run bowtie to coverage
    analysis_id = "test"
    bowtie_to_coverage(analysis_id, [input_file], output_file)
